<template>
  <div class="iconSelector">
    <div class="position-pick">
      <div class="position-btn">
        <el-button size="mini" type="text" :disabled="disabled">{{
          displayAddress
        }}</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "FormPositionPick",
  props: {
    disabled: {
      default: false,
    },
    value: {
      default: () => {
        return {
          address: "",
          lng: "",
          lat: "",
        };
      },
    },
  },
  data() {
    return {
      dialogVisible: false,
      center: [],
    };
  },
  computed: {
    displayAddress() {
      if (this.value.address) {
        return `${this.value.address}(${parseFloat(this.value.lng).toFixed(
          2
        )},${parseFloat(this.value.lat).toFixed(2)})`;
      }
      return "暂无位置信息";
    },
  },
  methods: {},
};
</script>
<style lang="scss" scoped>
/deep/ .el-button--text {
  font-size: 14px;
}
/deep/ .el-button--text {
  word-break: break-all;
  white-space: break-spaces;
  text-align: left;
  //   display: flex;
  //   word-wrap: break-word;
  //   flex-wrap: wrap;
}
</style>
